package com.quick.gc;

import java.util.*;

/**
 * @ClassName ArrayTest
 * @Description TODO
 * @Author Wangxin
 * @Date 2019-02-26 21:15
 * @Version 1.0
 **/
public class ArrayTest {

    public static void main(String[] args) {
        int [] a = {1,2,3,4,66};
        int [] b = {1,2,3,7,66};
        System.out.println(paixu(a,b).toString());
    }
    public static  List paixu(int[] a,int[] b){
        Set set = new HashSet();
        int temp[] = new int[a.length+b.length];
        System.arraycopy(a,0,temp,0,a.length);
        System.arraycopy(b,0,temp,a.length,b.length);
        for (int i = 0; i < temp.length; i++) {
            set.add(temp[i]);
        }
        List<Integer> list = new ArrayList<>(set);
        list.sort((s,f)->s-f);
        return list;

    }
}
